<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            height: 1000vh;
        }
    </style>
</head>

<body>
    <button id="btn">button</button>
    <script src="./debounce.js"></script>
    <script src="./throttle.js"></script>
    <script>
        let fn = (...args) => {
            console.log(1,args)
        }
        btn.onclick = debounce(fn,1000)

        document.onscroll = throttle(fn,1000)
    </script>
</body>

</html>